CC=/usr/local/bin/arm-apple-darwin-gcc
CFLAGS=-fsigned-char -g -ObjC -Wall -Wundeclared-selector -fobjc-exceptions -Wreturn-type -Wnested-externs -Wredundant-decls -Wbad-function-cast \
	-Wchar-subscripts -Winline -Wswitch -Wshadow -Wcast-qual
CPPFLAGS=
LD=$(CC)
LDFLAGS=-lobjc -framework CoreFoundation -framework Foundation -framework UIKit -framework LayerKit \
	-framework CoreGraphics -framework WebCore -framework GraphicsServices \
	-L$(HEAVENLY)/usr/lib -lc /usr/local/arm-apple-darwin/lib/libgcc_s.1.dylib -lssl -lcrypto

all:	Lockbox

Lockbox:	main.o LockboxApp.o LockboxListView.o LockboxTableCell.o LockboxStorage.o LockboxItem.o \
		LockboxItemView.o SSCrypto.o LockboxPasswordView.o LockboxPwPromptView.o LockboxTagView.o \
		UIPreferencesTableEx.o LockboxOptionsView.o LockboxOptions.o
	$(LD) $(LDFLAGS) -o $@ $^

%.o:	%.m
	$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

package: Lockbox
	rm -fr Lockbox.app
	mkdir -p Lockbox.app
	cp Lockbox Lockbox.app/Lockbox
	cp Info.plist Lockbox.app/Info.plist
	cp *.png Lockbox.app/
	

clean:
	rm -rf *.o Lockbox Lockbox.app
